home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / scheme / pcscheme / geneva / sources.exe / MAKEFILE < prev   
Encoding:
Text File  |  1993-12-11  |  12.5 KB  |  468 lines

  1. #* MAKEFILE
  2. #************************************************************************
  3. #*                                    *
  4. #*            PC Scheme/Geneva 4.02 Make file            *
  5. #*                                    *
  6. #* (c) 1985-1988 by Texas Instruments, Inc. See COPYRIGHT.TXT        *
  7. #* (c) 1992 by L. Bartholdi & M. Vuilleumier, University of Geneva    *
  8. #*                                    *
  9. #*----------------------------------------------------------------------*
  10. #*                                    *
  11. #*            The Generic UNIX-ish Makefile            *
  12. #*                                    *
  13. #*----------------------------------------------------------------------*
  14. #*                                    *
  15. #* Created by: L. Bartholdi        Date: 1992            *
  16. #* Revision history:                            *
  17. #* - 18 Jun 92:    Renaissance (Borland Compilers, ...)            *
  18. #*                                    *
  19. #*                    ``In nomine omnipotentii dei''    *
  20. #************************************************************************
  21.  
  22. BORLAND = "3.10"
  23. VERSION = "4.02PL1"
  24. VMDEBUG = 1
  25. TDEBUG  = 1
  26.  
  27. .PATH.bor = c:\borlandc
  28.  
  29. #
  30. # directories
  31. #
  32.  
  33. .PATH.app = bin
  34. .PATH.ash = sources\asm
  35. .PATH.asm = sources\asm
  36. .PATH.bin = bin
  37. .PATH.c   = sources\c
  38. .PATH.exe = bin
  39. .PATH.fsl = bin
  40. .PATH.pcs = bin
  41. .PATH.h   = sources\c
  42. .PATH.obj = compile
  43. .PATH.s   = sources\s
  44. .PATH.so  = compile
  45. .PATH.xrf = compile
  46.  
  47. TOOLS=$(.PATH.bor)\bin
  48. LIB=$(.PATH.bor)\lib
  49. CINC=$(.PATH.bor)\include
  50.  
  51. !if    $d(TDEBUG)
  52. CFLAGS=$(CFLAGS) -v
  53. ASMFLAGS=$(ASMFLAGS) /zi
  54. !endif
  55.  
  56. FLOAT=-f
  57. MODEL=-mm
  58. CFLAGS=$(CFLAGS) -M $(MODEL) -C -O2 -k- -Z $(FLOAT)
  59. ASMFLAGS=$(ASMFLAGS) /z /mx /t /m /i$(.PATH.asm)
  60.  
  61. ASM=$(TOOLS)\tasm $(AF)
  62. CC=$(TOOLS)\bcc $(CF)
  63. GREP=$(TOOLS)\grep
  64. H2ASH=$(TOOLS)\h2ash
  65. SCHEME=$(.PATH.exe)\pcs
  66. TCREF=$(TOOLS)\tcref
  67. TOUCH=$(TOOLS)\touch
  68.  
  69. # check include files automatically
  70. .autodepend
  71. .suffixes:    .asm .c .so
  72.  
  73. #
  74. # generic make (must be first)    -    File order is significant !
  75. #
  76.  
  77. it:             turboc.cfg      tasm.cfg        setup           autocomp \
  78.                 scheme.ash      pcs.exe     patch.pcs \
  79.                 tools           web        clcp.fsl    edwin
  80.         @-del MAKEAUTO.TMP
  81.  
  82. sources.exe:
  83.     arj a /ya /jm /je /r /b2 /z&&!
  84. PC Scheme/Geneva, version $(VERSION)
  85. (c) 1982-1988 Texas Instruments, inc. All rights reserved
  86. (c) 1992 L. Bartholdi & M. Vuilleumier, University of Geneva
  87. All source files for Borland C development tools
  88.  
  89. ---> Use parameter /ya to assume 'yes' to all queries
  90.  
  91. ! sources makefile.* sources\*.* 
  92.     arj a /ya /jm sources.exe /x*.eps /x*.ps /x*.dvi /x*.asc samples\*.* brief\*.* doc\*.*
  93.     arj a /ya /jm sources.exe sources\hershey\hershey.ps sources\hershey\hershey.sw
  94.  
  95. scheme.arj:
  96.     arj a /ya /jm /r /b2 /xmake0000.$$$ /v1440 /xcompile\\*.* /xbin\*.* /x*.ps /x*.eps /x*.dvi /x*.exe /x*.asc /z&&!
  97. PC Scheme/Geneva, version $(VERSION)
  98. (c) 1982-1988 Texas Instruments, inc. All rights reserved
  99. (c) 1992 L. Bartholdi & M. Vuilleumier, University of Geneva
  100. Assembly, C and Scheme source files for Borland C development tools
  101.  
  102. ! scheme
  103.  
  104. backup.arj:
  105.     arj a /ya /jm /r /b1 /xmake0001.$$$ /v1440 /xcompile\\*.* /xbin\*.* /x*.ps /x*.eps /x*.dvi /z&&!
  106. PC Scheme/Geneva, version $(VERSION) incremental backup
  107.  
  108. ! backup
  109.  
  110. pcscheme.exe:    turboc.cfg    tasm.cfg    pcs.exe    setup
  111.         tdstrip bin\pcs.exe
  112.     pklite bin\pcs.exe
  113.     -del pcscheme.exe
  114.     -del bin\*.map
  115.     -del bin\*.tfa
  116.     arj a /ya /jm /je /xmake0000.$$$ /z&&!
  117. PC Scheme/Geneva, version $(VERSION)
  118. (c) 1982-1988 Texas Instruments, inc. All rights reserved
  119. (c) 1992 L. Bartholdi & M. Vuilleumier, University of Geneva
  120. Executable files and docs for distribution
  121.  
  122. ---> Use parameter /ya to assume 'yes' to all queries
  123.  
  124. ! pcscheme bin\*.*
  125.     arj a /ya /jm pcscheme.exe scheme.ini doc\*.doc doc\*.tex doc\*.ps doc\*.asc
  126.     arj a /ya /jm pcscheme.exe samples\*.* brief\*.* edlisp\*.*
  127.     arj a /ya /jm pcscheme.exe sources\hershey\hershey.ps sources\hershey\hershey.sw
  128.  
  129. pcslim.exe:    turboc.cfg    tasm.cfg    pcs.exe    setup
  130.         tdstrip bin\pcs.exe
  131.     pklite bin\pcs.exe
  132.     -del pcslim.exe
  133.     -del bin\*.map
  134.     -del bin\*.tfa
  135.     arj a /ya /jm /je /xmake0000.$$$ /z&&!
  136. PC Scheme/Geneva, version $(VERSION)
  137. (c) 1982-1988 Texas Instruments, inc. All rights reserved
  138. (c) 1992 L. Bartholdi & M. Vuilleumier, University of Geneva
  139. Only Executable files for distribution, SLIMMED DOWN VERSION
  140.  
  141. ! pcslim bin\*.*
  142.     arj a /ya /jm pcslim.exe scheme.ini brief\scheme.cm
  143.  
  144. turboc.cfg:    makefile
  145.     echo    -DVERSION=$(VERSION) >turboc.cfg
  146. !if    $d(VMDEBUG)
  147.     echo    -DVMDEBUG >>turboc.cfg
  148. !endif
  149.     echo    -I$(.PATH.c) >>turboc.cfg
  150.     echo    -I$(CINC) >>turboc.cfg
  151.     echo    -L$(LIB) >>turboc.cfg
  152.     echo    -n$(.PATH.obj) >>turboc.cfg
  153.     echo    $(CFLAGS) >>turboc.cfg
  154.  
  155. tasm.cfg:    makefile
  156.     echo    $(ASMFLAGS) >tasm.cfg
  157. !if    $d(VMDEBUG)
  158.     echo    /dVMDEBUG >>tasm.cfg
  159. !endif
  160.  
  161. setup:
  162.     -if not exist compile\*.* md compile
  163.  
  164. #
  165. # generic rules
  166. #
  167.  
  168. .asm.obj:
  169.         $(ASM) $<,$@
  170.  
  171. .asm.xrf:
  172.         $(ASM) $<,nul,nul,$(.PATH.xrf)\$&
  173.  
  174. .c.obj:
  175.     $(CC) -P -c {$< }
  176.  
  177.  
  178. .c.xrf:
  179.         $(CC) -P -S {$< }
  180.         $(ASM) $(.PATH.obj)\$&,nul,nul,$(.PATH.xrf)\$&
  181.         @del $(.PATH.obj)\$&.ASM
  182.  
  183. .s.so:
  184.         $(SCHEME) MAKEAUTO.TMP {$& }
  185.  
  186. .so.fsl:
  187.     @copy /b $< $@
  188.  
  189. .so.pcs:
  190.     @copy /b $< $@
  191.  
  192. .obj.bin:
  193.     $(TOOLS)\tlink /t $<,$@
  194.  
  195. #
  196. # Automatic .h -> .ash translation
  197. #
  198.  
  199. # big bugs in h2ash !
  200. #scheme.ash:    scheme.h
  201. #    $(H2ASH) -n$(.PATH.ash) -P -qi $(MODEL) $**
  202.  
  203. scheme.ash:    scheme.h    $(.PATH.ash)\scheme.as0 
  204.     $(H2ASH) -P -qi $(MODEL) $(.PATH.h)\scheme.h
  205.     @$(GREP) "GLOBAL C.*FAR" $(.PATH.obj)\scheme.ash >$(.PATH.obj)\scheme.as1
  206.         @copy $(.PATH.ash)\scheme.as0+$(.PATH.obj)\scheme.as1 $(.PATH.ash)\scheme.ash
  207.         @type &&!
  208. %POPLCTL 
  209. ! >>$(.PATH.ash)\scheme.ash
  210.         @del $(.PATH.obj)\scheme.as?
  211.  
  212. #
  213. # Generate .EXE file
  214. #
  215.  
  216. pcs.exe:    arith.obj    asmlink.obj    debug.obj \
  217.                 error.obj    escape.obj      fastload.obj \
  218.         graphics.obj    input.obj \    
  219.         main.obj    memory.obj    msdos.obj \
  220.         output.obj    ports.obj       print.obj \
  221.         property.obj    read.obj    support.obj \
  222.         bid.obj        bigmath.obj    block.obj \
  223.         border.obj    biosio.obj    carcdr.obj \
  224.         commonio.obj    cons.obj    environ.obj \
  225.         gcmark.obj    gcreloc.obj \
  226.         gcsquish.obj    gcsweep.obj \
  227.         interprt.obj    interupt.obj    memmgr.obj \
  228.         objhash.obj    printatm.obj    printinc.obj \
  229.         readatom.obj    scannum.obj    scheme.obj \
  230.         search.obj    slink.obj    sproprty.obj \
  231.         stdio.obj    stack.obj    start.obj \
  232.         stream.obj    string.obj    swint.obj \
  233.         timer.obj    utils.obj    vars.obj \
  234.         window.obj
  235.     $(GREP) -lo "scheme.a*s*h" $(.PATH.obj)\*.obj >makelink.tmp
  236.     @echo graphics.lib >>makelink.tmp
  237.     $(CC) -lc -lyx -n. -e$(.PATH.exe)\pcs.exe @makelink.tmp
  238.     @del makelink.tmp
  239.  
  240. pcs.ref:        arith.xrf    asmlink.xrf    debug.xrf \
  241.                 error.xrf    escape.xrf      fastload.xrf \
  242.         graphics.xrf    input.xrf \    
  243.         main.xrf    memory.xrf    msdos.xrf \
  244.         output.xrf    ports.xrf       print.xrf \
  245.         property.xrf    read.xrf    support.xrf \
  246.         bid.xrf        bigmath.xrf    block.xrf \
  247.         border.xrf    biosio.xrf    carcdr.xrf \
  248.         commonio.xrf    cons.xrf    environ.xrf \
  249.         gcmark.xrf    gcreloc.xrf \
  250.         gcsquish.xrf    gcsweep.xrf \
  251.         interprt.xrf    interupt.xrf    memmgr.xrf \
  252.         objhash.xrf    printatm.xrf    printinc.xrf \
  253.         readatom.xrf    scannum.xrf    scheme.xrf \
  254.         search.xrf    slink.xrf    sproprty.xrf \
  255.         stdio.xrf    stack.xrf    start.xrf \
  256.         stream.xrf    string.xrf    swint.xrf \
  257.         timer.xrf    utils.xrf    vars.xrf \
  258.         window.xrf
  259. # move to compile, as a bug in TCREF allows only a short response file
  260.         @cd $(.PATH.xrf)
  261.         $(TCREF) @&&!
  262. arith+asmlink+debug+dump+error+escape+fastload+graphics+hash+input+
  263. main+memory+msdos+output+ports+print+printf+property+read+reify+reset+
  264. support+trace+bid+bigmath+block+border+biosio+carcdr+commonio+cons+
  265. environ+gcmark+gcreloc+gcsquish+gcsweep+interprt+interupt+memmgr+
  266. objhash+printatm+printinc+readatom+scannum+scheme+search+slink+sproprty+
  267. stdio+stack+start+stream+string+swint+timer+utils+vars+window,..\pcs.ref /p66 /w132 /c /r
  268. !
  269.         @cd ..
  270. #
  271. # Boot defs for compile.all
  272. #
  273.  
  274. miniboot.fsl:    miniboot.s
  275.     $(SCHEME) &&!
  276. (define pcs-debug-mode '())
  277. (let ((args (reverse pcs-initial-arguments)))
  278.   (fast-save-file (cadr args) (car args)))
  279. (exit)
  280. ! $** $<
  281.  
  282. #
  283. # Auto-compiler : source compiler
  284. #
  285. autocomp:       miniboot.fsl    makecomptemp    bootstrp.app
  286.  
  287. makecomptemp:
  288.         copy &&!
  289. (set! pcs-debug-mode '())
  290. (fast-load "bin\\\\miniboot.fsl")
  291. (fast-load "bin\\\\pretty.fsl")
  292. (define srcdir "sources\\\\s\\\\")         ; not too portable ...
  293. (define fsldir "compile\\\\")
  294. (for-each (lambda (file)
  295.             (let ((src (string-append srcdir file ".s"))
  296.                   (obj (string-append fsldir file ".so")))
  297.               (newline 'console)
  298.               (map (lambda (n) (princ n 'console))
  299.               `("[Compiling " ,src " to " ,obj "]"))
  300.               (newline 'console)
  301.               (gc)
  302.               (pcs-compile-file src obj)))
  303.   (cdr pcs-initial-arguments))
  304. (exit)
  305. ! MAKEAUTO.TMP
  306.  
  307. bootstrp.app:    macros.so    macroexp.so    simplify.so    analysis.so \
  308.         codegen.so    peephole.so    assemble.so    comp.so \
  309.         standard.so    stdfunc.so    io.so        opcodes.so \
  310.         debugger.so    charstr.so    loadcomp.so    loadrun.so \
  311.         toplevel.so
  312.     @echo. >$<
  313.     @© /b $<+$** $<
  314.     @touch $<
  315.  
  316. #
  317. # Patch file for bootstrap
  318. #
  319.  
  320. patch.pcs:    makecomptemp    patch.so    patch.s
  321.  
  322. #
  323. # Auto-compiler : Autoload tools
  324. #
  325. tools:          makecomptemp \
  326.                 advise.so       defstruc.so     ed.so \
  327.         edit.so        errhand.so    \
  328.                 fastsave.so     graphics.so     inspect.so \
  329.                 math.so         msdos.so        newwin.so \
  330.                 num2str.so      pretty.so       sort.so \
  331.                 vararg.so       windows.so \
  332.                 advise.fsl      defstruc.fsl    ed.fsl \
  333.         edit.fsl    errhand.fsl    desktop.fsl \
  334.         fastsave.fsl    graphics.fsl    inspect.fsl \
  335.         math.fsl    msdos.fsl    newwin.fsl \
  336.         num2str.fsl    pretty.fsl    sort.fsl \
  337.         vararg.fsl    windows.fsl    mouse.fsl \
  338.         step.fsl
  339.  
  340. step.fsl:    sources\step\step.s sources\step\stepaux.s sources\step\stepwrap.s
  341.     $(SCHEME) &&!
  342. (set! pcs-debug-mode '())
  343. (fast-save-file '("sources/step/step.s" "sources/step/stepaux.s"
  344.     "sources/step/stepwrap.s") "bin/step.fsl")
  345. (exit)
  346. !
  347.  
  348. #
  349. # WEB
  350. #
  351. web:    sweave.exe      stangle.exe
  352. sweave.exe:     sweb.c
  353.         $(CC) -e..\$< $**
  354. stangle.exe:    sweb.c
  355.         $(CC) -e..\$< -DTANGLE $**
  356.  
  357. #
  358. # Common LISP compatibility package
  359. #
  360. clcp.fsl:    sources\lisp\basic.lsp \
  361.         sources\lisp\defmacro.lsp \
  362.         sources\lisp\format.lsp \
  363.         sources\lisp\io.lsp \
  364.         sources\lisp\macros.s \
  365.         sources\lisp\sequence.lsp
  366.     move $(.PATH.fsl)\clcp.fsl clcp.old
  367.     $(SCHEME) &&!
  368. (define srcdir "sources/lisp/")
  369. (define bindir "bin/")
  370. (fast-load (%system-file-name "miniboot.fsl"))
  371. (fast-load (%system-file-name "clcp.old"))
  372. (fast-save-file (map (lambda (file) (writeln "Compiling CLCP: " file)
  373.                     (string-append srcdir file))
  374.              '("macros.s" "basic.lsp" "defmacro.lsp" "io.lsp"
  375.                "format.lsp" "sequence.lsp"))
  376.         (string-append bindir "clcp.fsl"))
  377. (exit)
  378. !
  379.     del $(.PATH.fsl)\clcp.old
  380.  
  381. #
  382. #    Edwin compilation
  383. #
  384. edwin:        miniboot.fsl
  385.     @make -fmakefile.edw
  386.  
  387. #    
  388. # scoops
  389. #
  390. scoops.fsl:
  391.     $(SCHEME) &&!
  392. (define srcdir "sources/s/scoops/")
  393. (define bindir "bin/")
  394. (fast-load (%system-file-name "miniboot.fsl"))
  395. (fast-save-file (map (lambda (file) (writeln "Compiling SCOOPS: " file)
  396.                     (string-append srcdir file))
  397.              '("class.s" "methods.s" "instance.s"
  398.                "inherit.s" "interf.s" "send.s" 
  399.                "utility.s" "expand.s" "types.s"))
  400.         (string-append bindir "scoops.fsl"))
  401. (exit)
  402. !
  403.  
  404. tutorial.fsl:
  405.     $(SCHEME) &&!
  406. (define srcdir "sources/s/scoops/")
  407. (define bindir "bin/")
  408. (fast-load (%system-file-name "miniboot.fsl"))
  409. (writeln "Compiling tutorial.")
  410. (fast-save-file (string-append srcdir "tutorial.s")
  411.             (string-append bindir "tutorial.fsl"))
  412. (writeln "Compiling frames.")
  413. (fast-save-file (string-append srcdir "frame.s")
  414.         (string-append bindir "frame.fsl"))
  415. (exit)
  416. !
  417. #
  418. # Stuff
  419. #
  420. miscellanea:    b.fsl   edlisp.fsl
  421.  
  422. b.fsl:  brief\b.sw
  423.         $(SCHEME) &&!
  424. (define srcdir "brief/")
  425. (define bindir "bin/")
  426. (fast-load (%system-file-name "miniboot.fsl"))
  427. (fast-save-file (string-append srcdir "b.sw")
  428.                 (string-append bindir "b.fsl"))
  429. (exit)
  430. !
  431.         
  432. edlisp.fsl:     edlisp.s
  433.         $(SCHEME) &&!
  434. (define srcdir "sources/s/")
  435. (define bindir "bin/")
  436. (fast-load (%system-file-name "miniboot.fsl"))
  437. (fast-save-file (string-append srcdir "edlisp.s")
  438.                 (string-append bindir "edlisp.fsl"))
  439. (exit)
  440. !
  441.         
  442. #
  443. # demos
  444. #
  445. snow.obj:    inline\snow.asm
  446.     tasm /m inline\snow $(.PATH.obj)\snow
  447.  
  448. snow.bin:    snow.obj
  449.  
  450. scramble.obj:    inline\scramble.asm
  451.     tasm /m inline\scramble $(.PATH.obj)\scramble
  452.  
  453. scramble.bin:    scramble.obj
  454.  
  455. peek.obj:    inline\peek.asm
  456.     tasm /m inline\peek $(.PATH.obj)\peek
  457.  
  458. peek.bin:    peek.obj
  459.  
  460. #
  461. # cleanup:
  462. #
  463. clean:    tidy
  464.     del $(.PATH.obj)\*.obj
  465. tidy:
  466.     del $(.PATH.asm)\*.bak
  467.     del $(.PATH.c)\*.bak
  468.